package org.monitoringtools.util;

public class AssertUtil {

    private static final String INPUT_IS_NULL = "Input is Null";

    public static void assertFieldNotNull(String field, Object value, String msg) {
        if (value == null)
            throw new RuntimeException(msg + ". Value '" + field + "'");
    }

    public static void assertNotNull(Object... objects) {
        if (objects == null)
            throw new RuntimeException(INPUT_IS_NULL);

        for (Object object : objects)
            if (object == null)
                throw new RuntimeException(INPUT_IS_NULL);
    }
}
